import request from '@/utils/request'

// 查询代驾司机列表
export function listDriver(query) {
  return request({
    url: '/driver/driver/list',
    method: 'get',
    params: query
  })
}

// 查询代驾司机详细
export function getDriver(id) {
  return request({
    url: '/driver/driver/' + id,
    method: 'get'
  })
}

// 新增代驾司机
export function addDriver(data) {
  return request({
    url: '/driver/driver',
    method: 'post',
    data: data
  })
}

// 修改代驾司机
export function updateDriver(data) {
  return request({
    url: '/driver/driver',
    method: 'put',
    data: data
  })
}

// 删除代驾司机
export function delDriver(id) {
  return request({
    url: '/driver/driver/' + id,
    method: 'delete'
  })
}

// 导出代驾司机
export function exportDriver(query) {
  return request({
    url: '/driver/driver/export',
    method: 'get',
    params: query
  })
}

// 绑定检测站
export function chooseStation(driverId,stationId) {
  return request({
    url: '/driver/driver/chooseStation/' + driverId + '/' + stationId,
    method: 'post'
  })
}



